#! /usr/bin/env python
import os

# A singleton decorator
# cls(class)
def singleton(cls, *args):
    instances = {}
    def _singleton(*args):
        if cls not in instances:
            instances[cls] = cls(args)
        return instances[cls]
    return _singleton

# Accounter
# Write account infomation to DB
@singleton
class Accounter():

    def __init__(self):
        pass

    def account(self):
        pass
